import { defineComponent, reactive } from "vue"
import '../../style/counter.css'
const Counter = defineComponent({
  setup() {
    const state = reactive({ count: 0 });

    const onClick = () => {
      state.count++
    }

    return {
      state,
      onClick
    }
  },


  render(ctx) {
    const { state, onClick } = ctx;
    return (
      <div class="counter">
        <div class="text">count: {state.count}</div>
        <button classc="btn" onClick={onClick}>Add</button>
      </div>
    )
  }
})

export default Counter